<?php
/*
 * -----------------------------
 * | Rev |    Date    | Author |
 * |  1  | 02-05-2011 | Martin |
 * |  2  | 02-05-2011 | Martin |
 * |  3  | 02-05-2011 | Martin |
 * -----------------------------
 * 
 * User class is build to represent a user object.
 * It wil contain the user id, name, password and email.
 */
class User {
	private $id;
	private $username;
	private $password;
	private $email;
	
	private function __construct($id, $username, $password, $email) {
		$this->id 		= 	$id;
		$this->username	= 	$username;
		$this->password	= 	$password;
		$this->email	=	$email;
	}
	
	//Getters
	private function getId() {
		return $id;
	}
	
	private function getUsername() {
		return $username;
	}
	
	private function getPassword() {
		return $password;
	}
	
	private function getEmail() {
		return $email;
	}
	
	//Update functions
	private function updateUser($username, $password, $email) {
		$this->username = $username;
		$this->password = $password;
		$this->email	= $email;
		DB::updateUser($this);
	}
}
?>